1. Field of the Invention
The embodiments relate to programming language grammar and, more particularly, to a computer-implemented method, a system and an associated program storage device that provide for automatic programming language grammar partitioning.
2. Description of the Related Art
Software code is typically written in a programming language (e.g., Java, Basic, C, C++, structured query language (SQL), etc.) in a text format and stored (e.g., in a text file). However, to execute the software code it must first be converted from the text format into a machine-readable format (i.e., from textual code into machine-readable code). To accomplish this, textual code for a parsing program is generated by a parsing program generator based on a set of grammar rules, which define the syntactic structure of all strings in the particular programming language. Once the textual code for the parsing program is generated by the parsing program generator, a complier converts (i.e., translates) the textual code into the required machine-readable code for the parsing program (i.e., into an executable parsing program, executed by an operating system or a virtual machine). The executable parsing program (i.e., the parser) is run on target programming language code. Unfortunately, the grammar for programming languages can at times be so large that the resulting textual code for the parsing program is too large to be compiled by the compiler into the required machine-readable code. This problem can be referred to as the “code too large”. Thus, there is a need for a computer-implemented method, a system and an associated program storage device to avoid the “code too large” problem.